/*

	MeshViewer.h
	
	Definition of the MeshViewer class which forms
	the base of the mesh viewer application for
	Era Astral.
	
	Written by Sigurd Suhm 2009

*/

#ifndef _MESHVIEWER_H
#define _MESHVIEWER_H

// Includes
#include "IDevice.h"		// Graphics device interface header
#include "IMesh.h"			// Mesh interface header
#include "EventHandler.h"	// Event handler class header
#include "InputDevice.h"	// Input device header

namespace EraAstral
{
	namespace tools
	{
		class MeshViewer : public IHasEvents
		{
			private:
				// Graphics device
				graphics::IDevice	*m_device;
				// Current mesh being shown
				graphics::IMesh		*m_mesh;
				// Event handler
				core::EventHandler	*m_eventHandler;
				// Input device
				core::InputDevice	*m_input;
				
				// Flag indicating if the application should keep running
				bool	m_shouldRun;
		
			public:
				// Default constructor
				MeshViewer();
				// Default destructor
				~MeshViewer();
				
				// Public methods
				void	Run();		// Runs the mesh viewer
				void	Exit();		// Exits the mesh viewer
				
				// Process events
				void ProcessEventSignal(const core::Event *event);
		};
	}
}

#endif		// _MESHVIEWER_H